﻿/*
 * Copyright (c) 2023 HiSilicon (Shanghai) Technologies CO., LIMITED.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef __HPM_REG_OFFSET_H__
#define __HPM_REG_OFFSET_H__

/* HPM Base address of Module's Register */
#define HPM_BASE                       (0x40018C00)

/******************************************************************************/
/*                       HPM Registers' Definitions                            */
/******************************************************************************/

#define HPM_PERI_PMC22_REG (HPM_BASE + 0x58) /* HPM0相关的时钟及软复位控制寄存器。 */
#define HPM_PERI_PMC23_REG (HPM_BASE + 0x5C) /* HPM0原始码字及报警信息寄存器。 */
#define HPM_PERI_PMC24_REG (HPM_BASE + 0x60) /* HPM0原始码字及RCC码上报寄存器。 */
#define HPM_PERI_PMC25_REG (HPM_BASE + 0x64) /* HPM0原始码型门限配置寄存器。 */
#define HPM_PERI_PMC26_REG (HPM_BASE + 0x68) /* HPM1相关的时钟及软复位控制寄存器。 */
#define HPM_PERI_PMC27_REG (HPM_BASE + 0x6C) /* HPM1原始码字及报警信息寄存器。 */
#define HPM_PERI_PMC28_REG (HPM_BASE + 0x70) /* HPM1原始码字及RCC码上报寄存器。 */
#define HPM_PERI_PMC29_REG (HPM_BASE + 0x74) /* HPM1原始码型门限配置寄存器。 */
#define HPM_PERI_PMC30_REG (HPM_BASE + 0x78) /* HPM2相关的时钟及软复位控制寄存器。 */
#define HPM_PERI_PMC31_REG (HPM_BASE + 0x7C) /* HPM2原始码字及报警信息寄存器。 */
#define HPM_PERI_PMC32_REG (HPM_BASE + 0x80) /* HPM2原始码字及RCC码上报寄存器。 */
#define HPM_PERI_PMC33_REG (HPM_BASE + 0x84) /* HPM2原始码型门限配置寄存器。 */
#define HPM_PERI_PMC34_REG (HPM_BASE + 0x88) /* HPM0循环监控周期微调寄存器 */
#define HPM_PERI_PMC35_REG (HPM_BASE + 0x8C) /* HPM1循环监控周期微调寄存器 */
#define HPM_PERI_PMC36_REG (HPM_BASE + 0x90) /* HPM2循环监控周期微调寄存器 */

#endif // __HPM_REG_OFFSET_H__
